package 位运算;

import java.util.Scanner;

public class 找出落单的数 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] a = new int[n];
        int q = 0;
        for (int i = 0; i < n; i++) {
            a[i] = scanner.nextInt();
            q = q ^a[i];
        }
        System.out.println(q);

    }
}
